# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@protonmail.com>
pkgname=btfs
pkgver=2.21
pkgrel=0
pkgdesc="Bittorrent filesystem based on FUSE"
options="!check" # No testsuite
url="https://github.com/johang/btfs"
arch="all"
license="GPL-3.0-or-later"
depends="python3"
makedepends="autoconf automake curl-dev fuse-dev libtorrent-rasterbar-dev"
subpackages="$pkgname-doc"
source="btfs-$pkgver.tar.gz::https://github.com/johang/btfs/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vfi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="ebef8820d71244d092f64c5d6970bd69fed9044c01f11a505536d265b8d57b34b94e63b5262950ef54d41c6d9dbaa4b301a827ce5fdd205f8dcb6b67765b6f4d  btfs-2.21.tar.gz"
